const questionModel = require('./../models/user-question')
const question = {
/**
 * 
 * @param {*用户列表分页} page 
 */
  async getList(page,sort) {
    let resultData = await questionModel.getQst(page,sort)
    return resultData
  },
  /**
   * 
   * @param {用户查询功能} find 
   */
  async search(find) {
    let resultData = await questionModel.getQstlike(find)
    return resultData
  },
  /**
   * 
   * @param {详情页} id 
   */
  async getdetil(id) {
    let resultData = await questionModel.getDetils(id)
    return resultData
  },
  /**
   * 
   * @param {用户回答信息} form 
   */
  async userAnswer(form) {
    let resultData = await questionModel.userAddask(form)
    return resultData
  },
  /**
   * 
   * @param {用户发表问题} form 
   */
  async userQuestions(form) {
    let resultData = await questionModel.userQuestion(form)
    return resultData
  },
  /**
   * 
   * @param {查询用户回答问题情况} name 
   */
  async userQstTitle(name) {
    let resultData = await questionModel.userQstTitle(name)
    return resultData
  },

  async getQstTitle(name) {
    let resultData = await questionModel.getUserAddQst(name)
    return resultData
  },
}
module.exports = question